package com.zk.service;

import com.zk.model.Blog;

import com.zk.model.Discuss;
import org.beetl.sql.core.engine.PageQuery;

import java.util.List;

public interface BlogService {

    void saveBlog(Blog blog);
// select DATE_FORMAT(createtime,'%Y-%m'),count(*) from test where user =8 group by DATE_FORMAT(createtime,'%Y-%m');/
    PageQuery<Blog> queryBlog(String keywords, Integer pageNo, Integer pageSize);

    List<String> queryBlogGroupByMonth();

    Blog queryOneBlog(Integer id);

    PageQuery<Discuss> queryDiscuss(Integer blogId,Integer pageNo, Integer pageSize);

    void saveDiscuss(Discuss discuss);
}
